<h3>添加文章</h3>

<% form_for(@article,:url=>article_category_articles_path(params[:article_category_id]),:html=>{:multipart=>true}) do |f|%>
  <%= f.error_messages %>

  <p>
    <%= f.label :title,"标题" %>
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label :article_category ,"类别"%>
    <%= f.select :article_category_id,@cate.collect{|c| [c.name,c.id]} %>
  </p>
  <p>
    <%= f.label :article_order ,"排序"%>
    <%= f.text_field :article_order,:size=>5 %>
  </p>
  <p>
    <%= f.label :come_from ,"摘自"%>
    <%= f.text_field :come_from %>
  </p>
  <p>
    <%= f.label :short_description,"简短描述"%>
    <%= f.text_area :short_description %>
  </p>
  <p>
    <%= f.label :recommend ,"是否推荐"%>
    <%= f.check_box :recommend %>
  </p>
  <p>
    <%= f.label :key_word ,"关键词"%>
    <%= f.text_field :key_word %>
  </p>
  <p>
    <%= f.label :click_count ,"点击数"%>
    <%= f.text_field :click_count ,:size=>5 %>
  </p>
  <p>
    <%= f.label :image ,"图片"%>
    <%= f.file_field :image %>
  </p>
  <p><%=render :partial=>"online_editor",:locals=>{:hidden_name=>"article_content[content]",:content=>nil,:identity_id=>nil} %></p>
  <p>
    <%= f.submit "Create" %>
  </p>
<% end %>

<%= link_to 'Back', article_category_articles_path(0) %>
